home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: genesis.ilinkgn.net!not-for-mail
- From: johno@ilinkgn.net (john)
- Subject: Help I'm stuck! Can anyone help with a printer driver in C++ printcom.cpp (1/1)
- Message-ID: <2f7cc$10f20.41@genesis.ilinkgn.net>
- Date: Thu, 15 Feb 1996 21:15:32 GMT
- Organization: ilink global networks
- X-Newsreader: WinVN 0.99.7
- MIME-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
-
- I am trying to write a C++ program using classes that has inline
- functions to pass controll codes to a printer and resets the printer
- after each one. Any suggestions on what I am doing wrong?? If you can
- fix it that would be much better!!
-
- Thanks
- C++ Novice
-
- #include <iostream.h>
- #include <iomanip.h>
- #include <fstream.h>
-
-
-
- class Printer{
-
- ofstream prt;
-
- public:
- Printer()
-
-
- prt open ("prn"); // <<<--- KEEP GETTING
- // "DECLARATION TERMINATED INCORRECTLY ERRORS
-
-
- void bold() {prt << "\x1B\x28\x73\x33\x42";}
- void score() {prt << "\x1B\x26\x64\x44";}
- void clmarg() {prt << "\x1B\x39";}
- void lscape() {prt << "\x1B\x26\x6C\x31\x4F";}
- void portrt() {prt << "\x1B\x26\x6C\x30\x4F";}
- void italic() {prt << "\x1B\x28\x73\x31\x53";}
- void uprite() {prt << "\x1B\x28\x73\x30\x53";}
-
- };
- {
-
- ~Printer();
-
- void(){prt << "\x1B\x45";}
- reset;
-
- prt close ("prn"); // <<<--- KEEP GETTING
- // "DECLARATION TERMINATED INCORRECTLY ERRORS
-
- }
- {
- print line (char s [])
- void page(){prt << '\f';}
-
- }
- void main ()
-
- {
-
- }
-
-
-